//-----------------------------------------------------------------------
//<copyright file="ChiTietBienBanKiemKeKhoBLL.cs
//Code gen by tool.
//</copyright>
//-----------------------------------------------------------------------
using System;
using PMS.Exceptions;
using System.Collections.Generic;
using PMS.DAL;
using PMS.Entity;

namespace PMS.BLL
{
	public class ChiTietBienBanKiemKeKhoBO : BaseBO
	{
		// Interface Instant Object
		private readonly IChiTietBienBanKiemKeKhoDAO chitietbienbankiemkekhoInterfaceObject = null;

		// Constructor
		public ChiTietBienBanKiemKeKhoBO()
		{
			chitietbienbankiemkekhoInterfaceObject = new DAL.ServiceFactory<IChiTietBienBanKiemKeKhoDAO>().CurrentDAL;
		}

		#region ChiTietBienBanKiemKeKho

		/// <summary>
		///
		/// </summary>
		/// <param name="chitietbienbankiemkekho"></param>
		public ChiTietBienBanKiemKeKho CreateChiTietBienBanKiemKeKho(ChiTietBienBanKiemKeKho chitietbienbankiemkekho)
		{
			try
			{
				return chitietbienbankiemkekhoInterfaceObject.CreateChiTietBienBanKiemKeKho(chitietbienbankiemkekho);
			}
			catch (Exception ex)
			{
				throw BusinessException.GetException("Business Access CreateChiTietBienBanKiemKeKho Exception", ex);
			}
		}

		/// <summary>
		///
		/// </summary>
		/// <param name="chitietbienbankiemkekho"></param>
		public void UpdateChiTietBienBanKiemKeKho(ChiTietBienBanKiemKeKho chitietbienbankiemkekho)
		{
			try
			{
				chitietbienbankiemkekhoInterfaceObject.UpdateChiTietBienBanKiemKeKho(chitietbienbankiemkekho);
			}
			catch (Exception ex)
			{
				throw BusinessException.GetException("Business Access UpdateChiTietBienBanKiemKeKhoException", ex);
			}
		}

		/// <summary>
		///
		/// </summary>
		/// <param name="chitietbienbankiemkekho"></param>
		public void DeleteChiTietBienBanKiemKeKho(ChiTietBienBanKiemKeKho chitietbienbankiemkekho)
		{
			try
			{
				chitietbienbankiemkekhoInterfaceObject.DeleteChiTietBienBanKiemKeKho(chitietbienbankiemkekho);
			}
			catch (Exception ex)
			{
				throw BusinessException.GetException("Business Access DeleteChiTietBienBanKiemKeKhoException", ex);
			}
		}

        public void DeleteChiTietBienBanKiemKeKhoByMaBBKKK(string maBBKKK)
        {
            try
            {
                chitietbienbankiemkekhoInterfaceObject.DeleteChiTietBienBanKiemKeKhoByMaBBKKK(maBBKKK);
            }
            catch (Exception ex)
            {
                throw BusinessException.GetException("Business Access DeleteChiTietBienBanKiemKeKhoException", ex);
            }
        }

		/// <summary>
		///
		/// </summary>
		public ChiTietBienBanKiemKeKhos GetAllChiTietBienBanKiemKeKho()
		{
			try
			{
				return chitietbienbankiemkekhoInterfaceObject.GetAllChiTietBienBanKiemKeKho();
			}
			catch (Exception ex)
			{
				throw BusinessException.GetException("Business Access GetAllChiTietBienBanKiemKeKho Exception", ex);
			}
		}

        public ChiTietBienBanKiemKeKhos GetAllChiTietBienBanKiemKeKhoFromChiTietNhapKho(int month, int year)
        {
            try
            {
                return chitietbienbankiemkekhoInterfaceObject.GetChiTietBienBanKiemKeKhoByMonthAndYear(month, year);
            }
            catch (Exception ex)
            {
                throw BusinessException.GetException("Business Access GetAllChiTietBienBanKiemKeKho Exception", ex);
            }
        }

        public ChiTietBienBanKiemKeKhos GetAllChiTietBienBanKiemKeKhoByMaKy(string maky)
        {
            try
            {
                return chitietbienbankiemkekhoInterfaceObject.GetChiTietBienBanKiemKeKhoByMaKy(maky);
            }
            catch (Exception ex)
            {
                throw BusinessException.GetException("Business Access GetAllChiTietBienBanKiemKeKho Exception", ex);
            }
        }

        public ChiTietBienBanKiemKeKhos GetAllChiTietBienBanKiemKeKhoByMaBBKK(string maBBKKK)
        {
            try
            {
                return chitietbienbankiemkekhoInterfaceObject.GetAllChiTietBienBanKiemKeKhoByMaBBKK(maBBKKK);
            }
            catch (Exception ex)
            {
                throw BusinessException.GetException("Business Access GetAllChiTietBienBanKiemKeKho Exception", ex);
            }
        }

		/// <summary>
		///
		/// </summary>
		/// <param name="maBBKKK"></param>
		public ChiTietBienBanKiemKeKho GetChiTietBienBanKiemKeKhoByID(string maBBKKK, int MaLuuKHo)
		{
			try
			{
				return chitietbienbankiemkekhoInterfaceObject.GetChiTietBienBanKiemKeKhoByID(maBBKKK, MaLuuKHo);
			}
			catch (Exception ex)
			{
				throw BusinessException.GetException("Business Access GetChiTietBienBanKiemKeKhoBy ID Exception", ex);
			}
		}

		#endregion
	}
}
